<!DOCTYPE html> <html><!--
 Archive processed by SingleFile 
 url: https://mp.weixin.qq.com/s/_xMZhnZ_ICbR_Exfr_YRpQ 
 saved date: Thu Nov 21 2019 15:03:29 GMT+0800 (中国标准时间) 
--><meta charset=utf-8>
<meta http-equiv=X-UA-Compatible content="IE=edge">
<meta name=viewport content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,viewport-fit=cover">
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<meta name=format-detection content="telephone=no">
<meta name=description content="记住：永远不要在 MySQL 中使用 UTF-8">
<meta name=author content=译者：无明>
<meta property=og:title content="记住：永远不要在 MySQL 中使用 UTF-8">
<meta property=og:url content="http://mp.weixin.qq.com/s?__biz=MzI3NjU2ODA5Mg==&amp;mid=2247484845&amp;idx=2&amp;sn=4e1a34d9b4ba5ec0d7468bdf032aa22d&amp;chksm=eb72c4dedc054dc83a21446e08d677266bb5fa553cf69f9b22b21e29f1b6d8ef9bb5336e6270#rd">
<meta property=og:image content="http://mmbiz.qpic.cn/mmbiz_jpg/M7B64fHXISulxpNQjE62YYRovMchAjjRVfeVtiaibuCHHsDdjK4cCBon2qIoWbqtvECQ27icnBJasLIomA06aiaZkQ/0?wx_fmt=jpeg">
<meta property=og:description content="记住：永远不要在 MySQL 中使用 UTF-8">
<meta property=og:site_name content=微信公众平台>
<meta property=og:type content=article>
<meta property=og:article:author content=译者：无明>
<meta property=twitter:card content=summary>
<meta property=twitter:image content="http://mmbiz.qpic.cn/mmbiz_jpg/M7B64fHXISulxpNQjE62YYRovMchAjjRVfeVtiaibuCHHsDdjK4cCBon2qIoWbqtvECQ27icnBJasLIomA06aiaZkQ/0?wx_fmt=jpeg">
<meta property=twitter:title content="记住：永远不要在 MySQL 中使用 UTF-8">
<meta property=twitter:creator content=译者：无明>
<meta property=twitter:site content=微信公众平台>
<meta property=twitter:description content="记住：永远不要在 MySQL 中使用 UTF-8">
<title>记住：永远不要在 MySQL 中使用 UTF-8</title>
<style media>.rich_media_inner{overflow-wrap:break-word;hyphens:auto}.rich_media_area_primary{padding:calc(20px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 12px calc(16px + env(safe-area-inset-left))}.rich_media_area_extra{padding:0 calc(16px + env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left))}html{line-height:1.6}body{color:#333;background-color:#f2f2f2;letter-spacing:.034em}h2{font-weight:400}*{margin:0;padding:0}a{-webkit-tap-highlight-color:rgba(0,0,0,0)}.rich_media_title{font-size:22px;line-height:1.4;margin-bottom:14px}@supports(-webkit-overflow-scrolling:touch){.rich_media_title{font-weight:700}}.rich_media_meta_list{margin-bottom:22px;line-height:20px;font-size:0;overflow-wrap:break-word;word-break:break-all}.rich_media_meta_list em{font-style:normal}.rich_media_meta{display:inline-block;vertical-align:middle;margin:0 10px 10px 0;font-size:15px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.rich_media_meta_text{color:rgba(0,0,0,0.3)}.rich_media_meta_nickname{position:relative}.rich_media_content{overflow:hidden;color:#333;font-size:17px;overflow-wrap:break-word;hyphens:auto;text-align:justify;z-index:0}.rich_media_content *{max-width:100% !important;box-sizing:border-box !important;overflow-wrap:break-word !important}.rich_media_content p{clear:both;min-height:1em}.rich_media_content .list-paddingleft-2{padding-left:2.2em}@media screen and (min-width:1024px){.rich_media_area_primary_inner,.rich_media_area_extra_inner{max-width:677px;margin-left:auto;margin-right:auto}.rich_media_area_primary{padding-top:32px}}.appmsg_skin_default .rich_media_area_primary{background-color:#fff}.appmsg_style_default .rich_media_tool{padding-top:15px}.read-more__area{margin:30px 0}html,body{height:100%}</style>
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/pc492bcc.css">
<![endif]-->
<style id=page/appmsg_new/not_in_mm.css>.weui-flex{display:flex}.weui-flex__item{-webkit-box-flex:1;flex:1 1 0%}html{text-size-adjust:100%}body{line-height:1.6;font-family:-apple-system-font,BlinkMacSystemFont,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif;font-size:16px}body,h1,h2,p,ul,ol{margin:0}a{color:#576b95;text-decoration:none}body,html{-webkit-appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}@media(orientation:portrait){@-webkit-keyframes opr_fade_out{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes opr_fade_in{0%{opacity:0}100%{bottom:0;opacity:1}}}@-webkit-keyframes opr_fade_out{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes opr_fade_in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes opacity-60-25-0-12{0%{opacity:.25}0.01%{opacity:.25}0.02%{opacity:1}60.01%{opacity:.25}100%{opacity:.25}}@-webkit-keyframes opacity-60-25-1-12{0%{opacity:.25}8.34333%{opacity:.25}8.35333%{opacity:1}68.3433%{opacity:.25}100%{opacity:.25}}@-webkit-keyframes opacity-60-25-2-12{0%{opacity:.25}16.6767%{opacity:.25}16.6867%{opacity:1}76.6767%{opacity:.25}100%{opacity:.25}}@-webkit-keyframes opacity-60-25-3-12{0%{opacity:.25}25.01%{opacity:.25}25.02%{opacity:1}85.01%{opacity:.25}100%{opacity:.25}}@-webkit-keyframes opacity-60-25-4-12{0%{opacity:.25}33.3433%{opacity:.25}33.3533%{opacity:1}93.3433%{opacity:.25}100%{opacity:.25}}@-webkit-keyframes opacity-60-25-5-12{0%{opacity:.270958}41.6767%{opacity:.25}41.6867%{opacity:1}1.67667%{opacity:.25}100%{opacity:.270958}}@-webkit-keyframes opacity-60-25-6-12{0%{opacity:.375125}50.01%{opacity:.25}50.02%{opacity:1}10.01%{opacity:.25}100%{opacity:.375125}}@-webkit-keyframes opacity-60-25-7-12{0%{opacity:.479292}58.3433%{opacity:.25}58.3533%{opacity:1}18.3433%{opacity:.25}100%{opacity:.479292}}@-webkit-keyframes opacity-60-25-8-12{0%{opacity:.583458}66.6767%{opacity:.25}66.6867%{opacity:1}26.6767%{opacity:.25}100%{opacity:.583458}}@-webkit-keyframes opacity-60-25-9-12{0%{opacity:.687625}75.01%{opacity:.25}75.02%{opacity:1}35.01%{opacity:.25}100%{opacity:.687625}}@-webkit-keyframes opacity-60-25-10-12{0%{opacity:.791792}83.3433%{opacity:.25}83.3533%{opacity:1}43.3433%{opacity:.25}100%{opacity:.791792}}@-webkit-keyframes opacity-60-25-11-12{0%{opacity:.895958}91.6767%{opacity:.25}91.6867%{opacity:1}51.6767%{opacity:.25}100%{opacity:.895958}}@-webkit-keyframes loading{0%{transform:rotate3d(0,0,1,0)}100%{transform:rotate3d(0,0,1,360deg)}}@keyframes loading{0%{transform:rotate3d(0,0,1,0)}100%{transform:rotate3d(0,0,1,360deg)}}.article_extend_area{padding:30px 0 0}.article_extend_area:empty{display:none}@supports(-webkit-overflow-scrolling:touch){.reward_button{font-weight:700}}.rich_media_extra{position:relative}.top_banner{background-color:#fff}.ct_mpda_wrp{margin:38px 0 20px}.like_btn{-webkit-appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0;background-color:transparent;border:0;display:inline-block;vertical-align:middle;padding:0;font-size:15px;font-family:inherit;line-height:2.13333;color:#576b95}.like_btn::before{font-size:16px;content:"";display:inline-block;width:1em;height:1.125em;vertical-align:middle;margin-top:-0.25em;margin-right:.05em;background:url("data:image/svg+xml;charset=utf8, %3Csvg width='18' height='20' viewBox='0 0 18 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.485 3.785l2.506-2.477a1.674 1.674 0 0 1 2.352 0l2.505 2.477 3.423.908a1.653 1.653 0 0 1 1.18 2.026l-.917 3.382.918 3.384a1.652 1.652 0 0 1-1.18 2.024l-3.399.902-2.53 2.493a1.674 1.674 0 0 1-2.352 0l-2.506-2.477-3.423-.908a1.653 1.653 0 0 1-1.18-2.026l.917-3.383-.918-3.392a1.652 1.652 0 0 1 1.18-2.025l3.424-.908zm.836 1.447l.006 2.298c0 .59-.317 1.138-.828 1.438l-2.015 1.143 2.005 1.136c.517.29.838.841.838 1.435l-.006 2.298 2.01-1.156a1.667 1.667 0 0 1 1.675-.003l2.007 1.154-.007-2.302c0-.583.319-1.13.829-1.43l2.014-1.142-2.005-1.136a1.647 1.647 0 0 1-.838-1.435l.007-2.298-2.01 1.156a1.65 1.65 0 0 1-1.67.001L6.321 5.232zm-1.094 2.3L5.22 4.994l-2.878.763a.552.552 0 0 0-.398.674l.77 2.851 2.23-1.264a.573.573 0 0 0 .283-.486zm-.278 4.673L2.714 10.94l-.77 2.84a.553.553 0 0 0 .399.676l2.877.763.007-2.537a.548.548 0 0 0-.278-.476zm3.935 2.57l-2.216 1.274 2.096 2.073c.222.22.583.22.806 0l2.103-2.073-2.214-1.274a.57.57 0 0 0-.575 0zm4.222-2.104l.007 2.538 2.879-.763a.552.552 0 0 0 .398-.674l-.771-2.843-2.23 1.265a.57.57 0 0 0-.283.477zm.279-4.664l2.234 1.266.77-2.84a.553.553 0 0 0-.399-.676l-2.877-.763-.007 2.537c0 .196.107.38.279.476zm-4.501-2.57c.176.104.39.104.566 0l2.215-1.274L9.57 2.09a.574.574 0 0 0-.805 0L6.668 4.163l2.216 1.274z' fill='%23576B95' fill-rule='evenodd'/%3E%3C/svg%3E") 0 0 / 1em no-repeat transparent}.like_num{font-size:15px;margin-left:.2em}.like_comment_wrp{font-size:17px;margin-top:9px;margin-bottom:8px;position:relative;z-index:1}.like_comment_wrp::before,.like_comment_wrp::after{content:"";display:inline-block;width:0;height:0;border-width:0 7px 7px;border-style:dashed dashed solid;border-color:transparent transparent rgba(0,0,0,0.03);position:absolute;top:-7px;right:28px}.like_comment_wrp::after{border-bottom-color:#f7f7f7;top:-6px}.like_comment_inner{background-color:rgba(0,0,0,0.03);border-radius:4px;overflow:hidden;padding:24px 16px;display:flex;-webkit-box-align:center;align-items:center;text-align:center}.like_comment_primary_wrp{font-size:16px;margin-top:9px;margin-bottom:4px;background-color:#fff;z-index:21}.like_comment_primary_wrp::before,.like_comment_primary_wrp::after{content:"";display:inline-block;width:0;height:0;border-width:0 7px 7px;border-style:dashed dashed solid;border-color:transparent transparent #fff;position:absolute;top:-7px;right:28px}.like_comment_primary_wrp::after{border-bottom-color:#fff;top:-6px}.like_comment_primary_wrp.editing{position:fixed;top:10px;bottom:0;left:0;right:0;margin:0}.like_comment_primary_wrp.editing::before,.like_comment_primary_wrp.editing::after{display:none}.like_comment_primary_mask{position:fixed;z-index:20;top:0;left:0;bottom:0;right:0;background-color:rgba(0,0,0,0.2)}@-webkit-keyframes weuiLoading{0%{transform:rotate3d(0,0,1,0)}100%{transform:rotate3d(0,0,1,360deg)}}@keyframes weuiLoading{0%{transform:rotate3d(0,0,1,0)}100%{transform:rotate3d(0,0,1,360deg)}}@-webkit-keyframes slidein{0%{transform:translateX(-50%)}100%{transform:translateX(0)}}@keyframes slidein{0%{transform:translateX(-50%)}100%{transform:translateX(0)}}.mpda_bottom_container{position:relative}.rich_media_tool{overflow:hidden;line-height:32px}.rich_media_tool .meta_primary{float:left}.rich_media_tool .meta_extra{float:right}.rich_media_tool .meta_praise{text-align:right}.media_tool_meta i{vertical-align:0;position:relative;top:1px}.meta_praise{-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.meta_praise .praise_num{display:inline-block;vertical-align:top}.meta_praise:hover{cursor:pointer}.icon_praise_gray{background:url("") 0 0 / 100% no-repeat transparent;display:inline-block}.rich_media_tool{font-size:15px}.rich_media_tool .meta_primary{margin-right:16px}.rich_media_tool .meta_extra{margin-left:16px;color:#576b95}.rich_media_tool .meta_praise{min-width:2.5em}.rich_media_tool .meta_praise i{margin-right:5px}.icon_praise_gray{background-image:url("data:image/svg+xml;charset=utf8, %3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 6.988h-.003c-.095-.01-.167-.022-.125-.022H1.75c-.343 0-.75.39-.75.7v6.73c0 .31.27.57.611.57H2.5V7.01a.51.51 0 0 1 0-.022zm1 .003a.55.55 0 0 1 0 .02v7.955h7.414c.748 0 1.395-.361 1.773-1.324a37.17 37.17 0 0 0 1.115-2.57c.219-.564.413-1.11.575-1.627.247-.785.413-1.48.484-2.058.073-.595-.565-1.021-1.236-1.021h-4.97l.102-.586.18-1.027.13-.55a35.058 35.058 0 0 0 .245-1.128c.212-1.098-.483-2.019-1.238-2.067-.74-.048-1.1.111-1.104.562-.008 1.276-.45 2.805-1.252 4.129-.357.589-.899.965-1.56 1.16-.217.065-.438.107-.658.132zm6.345-1.625h3.78c1.19 0 2.393.804 2.229 2.143-.08.646-.26 1.397-.523 2.235-.17.54-.37 1.107-.597 1.69a38.158 38.158 0 0 1-1.133 2.61c-.525 1.346-1.557 1.922-2.687 1.922H1.61c-.886 0-1.611-.698-1.611-1.57v-6.73c0-.871.864-1.7 1.75-1.7l.719.009A3.285 3.285 0 0 0 3.876 5.9c.435-.13.769-.361.986-.72.71-1.171 1.102-2.525 1.108-3.618C5.978.338 6.901-.07 8.14.01c1.36.088 2.48 1.57 2.155 3.255a36.012 36.012 0 0 1-.253 1.167l-.124.52-.072.414z' fill='%23576B95' fill-rule='nonzero'/%3E%3C/svg%3E");font-size:16px;width:1em;height:1em;background-size:1em}.praise_num{color:#576b95}a,button{cursor:pointer}.rich_media_extra{overflow:hidden}.rich_media_extra_discuss{padding-top:0}.praise_num:empty{margin-left:-3px}.comment_primary_emotion_panel_wrp{position:absolute;z-index:1;padding-top:8px;padding-bottom:16px}.comment_primary_emotion_panel{background:#fff;box-shadow:rgba(0,0,0,0.16) 0 2px 8px 0;border-radius:4px;width:376px;height:216px;overflow-y:auto}.tips_global_primary{color:rgba(0,0,0,0.3)}.weui-dialog{position:fixed;z-index:5000;top:50%;left:16px;right:16px;transform:translate(0,-50%);background-color:#fff;text-align:center;border-radius:12px;overflow:hidden;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;max-height:90%}@media screen and (min-width:352px){.weui-dialog{width:320px;margin:0 auto}}.weui-toast{position:fixed;z-index:5000;width:120px;height:120px;top:40%;left:50%;transform:translate(-50%,-50%);background:rgba(17,17,17,0.7);text-align:center;border-radius:5px;color:#fff;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center}.weui-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,0.6)}.weui-mask_transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}@-webkit-keyframes weuiLoading{0%{transform:rotate3d(0,0,1,0)}100%{transform:rotate3d(0,0,1,360deg)}}@keyframes weuiLoading{0%{transform:rotate3d(0,0,1,0)}100%{transform:rotate3d(0,0,1,360deg)}}@media screen and (max-width:1023px){.profile_container{display:none !important}}.weui-desktop-popover{white-space:normal;overflow-wrap:break-word;hyphens:auto;z-index:500;color:#353535;line-height:1.6;background:#fff;border-radius:2px}.weui-desktop-popover::before{content:" ";width:8px;height:8px;background-color:#fff;box-shadow:#d4d4d4 0 2px 10px 0;transform:matrix(0.71,0.71,-0.71,0.71,0,0);position:absolute}.weui-desktop-popover::after{content:" ";background-color:#fff;position:absolute}.weui-desktop-popover_img-text{text-align:center}.weui-desktop-popover_pos-up-center{margin-top:16px}.weui-desktop-popover_pos-up-left::before,.weui-desktop-popover_pos-up-center::before,.weui-desktop-popover_pos-up-right::before{top:-4px}.weui-desktop-popover_pos-up-left::after,.weui-desktop-popover_pos-up-center::after,.weui-desktop-popover_pos-up-right::after{height:10px;top:0;left:0;right:0}.weui-desktop-popover_pos-up-center::before,.weui-desktop-popover_pos-down-center::before{margin-left:-4px}.weui-desktop-popover{position:absolute;padding:14px;box-shadow:none;border:1px solid #d9dadc;width:182px;box-sizing:border-box}.weui-desktop-popover::before{box-shadow:none;border:1px solid #d9dadc}.not_in_mm .rich_media_meta_list{position:relative;z-index:1}.not_in_mm .rich_media_content{position:relative}.not_in_mm .profile_container{width:535px;position:absolute;top:100%;left:0;margin-top:10px;font-size:14px}.not_in_mm .profile_inner{position:relative;padding:30px 22px 36px 144px;background-color:#fff;border:1px solid #d9dadc}.not_in_mm .profile_arrow_wrp{position:absolute;left:22px;top:-8px}.not_in_mm .rich_media_inner{position:relative}.not_in_mm .qr_code_pc_outer{position:fixed;left:0;right:0;top:20px;color:#717375;text-align:center;display:none !important}.not_in_mm .qr_code_pc_inner{position:relative;width:740px;margin-left:auto;margin-right:auto}.not_in_mm .qr_code_pc{position:absolute;right:-140px;top:0;width:140px;padding:16px;border:1px solid #d9dadc;background-color:#fff;overflow-wrap:break-word;word-break:break-all}.not_in_mm .qr_code_pc p{font-size:14px;line-height:20px}.not_in_mm .qr_code_pc_img{width:102px;height:102px}@media screen and (min-width:1024px){.not_in_mm .qr_code_pc_outer{top:32px;display:block !important}}.not_in_mm .qr_code_pc{box-sizing:border-box}</style><link rel="shortcut icon" type=image/x-icon href=""></head>
 <body id=activity-detail class="zh_CN mm_appmsg appmsg_skin_default appmsg_style_default not_in_mm">
 
 
 
<div id=js_article class=rich_media>
 
 <div id=js_top_ad_area class=top_banner></div>
 
 <div class=rich_media_inner>
 
 
 <div id=page-content class=rich_media_area_primary>
 <div class=rich_media_area_primary_inner>
 
 
 
 <div id=img-content>
 
 <h2 class=rich_media_title id=activity-name>
 
 
 
 记住：永远不要在 MySQL 中使用 UTF-8
 </h2>
 <div id=meta_content class=rich_media_meta_list>
 <span class="rich_media_meta rich_media_meta_text">
 译者：无明
 </span>
 
 <span class="rich_media_meta rich_media_meta_nickname" id=profileBt>
 <a href=https://mp.weixin.qq.com/s/_xMZhnZ_ICbR_Exfr_YRpQ id=js_name>
 Java架构师之路 </a>
 <div id=js_profile_qrcode class=profile_container style=display:none>
 <div class=profile_inner>
 
 
 
 
 
 </div>
 <span class=profile_arrow_wrp id=js_profile_arrow_wrp>
 
 
 </span>
 </div>
 </span>
 <em id=publish_time class="rich_media_meta rich_media_meta_text">11月5日</em>
 </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 <div class=rich_media_content id=js_content>
 
 
 
 
 <section data-mpa-template=t mpa-paragraph-type=ignored style='white-space:normal;color:#333333;font-family:-apple-system-font,system-ui,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif;font-size:17px;letter-spacing:.544px;text-align:justify;background-color:#ffffff' data-mpa-powered-by=yiban.io><p style=white-space:normal;background-color:#ffffff;text-align:left;letter-spacing:1px;line-height:1.5em><span style=letter-spacing:.544px;color:#021eaa;font-size:11px>译者：无明</span><p style=white-space:normal;background-color:#ffffff;text-align:left;letter-spacing:1px;line-height:1.5em><span style=letter-spacing:.544px;color:#021eaa;font-size:11px>作者：Adam Hooper</span><p style=white-space:normal;background-color:#ffffff;text-align:left;letter-spacing:1px;line-height:1.5em><span style=letter-spacing:.544px;color:#021eaa;font-size:11px>来源：https://www.infoq.cn/article/in-mysql-never-use-utf8-use-utf8</span><span style=letter-spacing:.544px;color:#021eaa;font-size:12px></span><hr style="border-style:solid;border-width:1px 0 0;border-color:rgba(0,0,0,0.1);transform-origin:0 0;transform:scale(1,0.5)"><p style=white-space:normal;background-color:#ffffff;text-align:left;letter-spacing:1px;line-height:1.5em><br></p></section><p mpa-paragraph-type=body><span style='font-size:15px;background-color:#ffffff;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;text-align:start'>最近我遇到了一个 bug，我试着通过 Rails 在以“utf8”编码的 MariaDB 中保存一个 UTF-8 字符串，然后出现了一个离奇的错误：</span><br><pre style=color:#34495e;font-size:16px;text-align:start;background-color:#ffffff><section style="padding:.5em;font-family:Consolas,Inconsolata,Courier,monospace;display:block;overflow-x:auto;font-size:14px;letter-spacing:0;background:#1d1f21;color:#c5c8c6;line-height:2em;overflow-wrap:normal !important;word-break:normal !important;overflow-y:auto !important"><span style=font-size:15px>Incorrect&nbsp;string&nbsp;value:&nbsp;‘\xF0\x9F\x98\x83&nbsp;&lt;…’&nbsp;for&nbsp;column&nbsp;‘summary’&nbsp;at&nbsp;row&nbsp;1</span><br style="overflow-wrap:inherit !important;word-break:inherit !important"></section></pre><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>我用的是 UTF-8 编码的客户端，服务器也是 UTF-8 编码的，数据库也是，就连要保存的这个字符串“ &lt;…”也是合法的 UTF-8。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>问题的症结在于，MySQL 的“utf8”实际上不是真正的 UTF-8。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>“utf8”只支持每个字符最多三个字节，而真正的 UTF-8 是每个字符最多四个字节。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>MySQL 一直没有修复这个 bug，他们在 2010 年发布了一个叫作“utf8mb4”的字符集，绕过了这个问题。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>当然，他们并没有对新的字符集广而告之（可能是因为这个 bug 让他们觉得很尴尬），以致于现在网络上仍然在建议开发者使用“utf8”，但这些建议都是错误的。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>简单概括如下：</span></section><ul class=list-paddingleft-2><li><section style=line-height:2em><span style=font-size:15px>MySQL 的“utf8mb4”是真正的“UTF-8”。</span></section><li><section style=line-height:2em><span style=font-size:15px>MySQL 的“utf8”是一种“专属的编码”，它能够编码的 Unicode 字符并不多。</span></section></ul><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>我要在这里澄清一下：</span><span style=font-size:15px>所有在使用“utf8”的 MySQL 和 MariaDB 用户都应该改用“utf8mb4”，永远都不要再使用“utf8”。</span></section><h1 style='margin-top:35px;margin-bottom:15px;padding-bottom:.5em;font-weight:bold;cursor:text;font-size:1.2rem;border-bottom:1px solid #dddddd;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px;color:#ab1942>那么什么是编码？</span><span style=font-size:15px;color:#ab1942>什么是 UTF-8？</span></h1><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>我们都知道，计算机使用 0 和 1 来存储文本。</span><span style=font-size:15px>比如字符“C”被存成“01000011”，那么计算机在显示这个字符时需要经过两个步骤：</span></section><ol class=list-paddingleft-2><li><section style=line-height:2em><span style=font-size:15px>计算机读取“01000011”，得到数字 67，因为 67 被编码成“01000011”。</span></section><li><section style=line-height:2em><span style=font-size:15px>计算机在 Unicode 字符集中查找 67，找到了“C”。</span></section></ol><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>同样的：</span></section><ol class=list-paddingleft-2><li><section style=line-height:2em><span style=font-size:15px>我的电脑将“C”映射成 Unicode 字符集中的 67。</span></section><li><section style=line-height:2em><span style=font-size:15px>我的电脑将 67 编码成“01000011”，并发送给 Web 服务器。</span></section></ol><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>几乎所有的网络应用都使用了 Unicode 字符集，因为没有理由使用其他字符集。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>Unicode 字符集包含了上百万个字符。</span><span style=font-size:15px>最简单的编码是 UTF-32，每个字符使用 32 位。</span><span style=font-size:15px>这样做最简单，因为一直以来，计算机将 32 位视为数字，而计算机最在行的就是处理数字。</span><span style=font-size:15px>但问题是，这样太浪费空间了。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>UTF-8 可以节省空间，在 UTF-8 中，字符“C”只需要 8 位，一些不常用的字符，比如“”需要 32 位。</span><span style=font-size:15px>其他的字符可能使用 16 位或 24 位。</span><span style=font-size:15px>一篇类似本文这样的文章，如果使用 UTF-8 编码，占用的空间只有 UTF-32 的四分之一左右。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>MySQL 的“utf8”字符集与其他程序不兼容，它所谓的“”，可能真的是一坨……</span></section><h1 style='margin-top:35px;margin-bottom:15px;padding-bottom:.5em;font-weight:bold;cursor:text;font-size:1.2rem;border-bottom:1px solid #dddddd;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px;color:#ab1942>MySQL 简史</span></h1><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>为什么 MySQL 开发者会让“utf8”失效？</span><span style=font-size:15px>我们或许可以从提交日志中寻找答案。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>MySQL 从 4.1 版本开始支持 UTF-8，也就是 2003 年，而今天使用的 UTF-8 标准（RFC 3629）是随后才出现的。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>旧版的 UTF-8 标准（RFC 2279）最多支持每个字符 6 个字节。</span><span style=font-size:15px>2002 年 3 月 28 日，MySQL 开发者在第一个 MySQL 4.1 预览版中使用了 RFC 2279。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>同年 9 月，他们对 MySQL 源代码进行了一次调整：</span><span style=font-size:15px>“UTF8 现在最多只支持 3 个字节的序列”。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>是谁提交了这些代码？</span><span style=font-size:15px>他为什么要这样做？</span><span style=font-size:15px>这个问题不得而知。</span><span style=font-size:15px>在迁移到 Git 后（MySQL 最开始使用的是 BitKeeper），MySQL 代码库中的很多提交者的名字都丢失了。</span><span style=font-size:15px>2003 年 9 月的邮件列表中也找不到可以解释这一变更的线索。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>不过我可以试着猜测一下。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>2002 年，MySQL 做出了一个决定：</span><span style=font-size:15px>如果用户可以保证数据表的每一行都使用相同的字节数，那么 MySQL 就可以在性能方面来一个大提升。</span><span style=font-size:15px>为此，用户需要将文本列定义为“CHAR”，每个“CHAR”列总是拥有相同数量的字符。</span><span style=font-size:15px>如果插入的字符少于定义的数量，MySQL 就会在后面填充空格，如果插入的字符超过了定义的数量，后面超出部分会被截断。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>MySQL 开发者在最开始尝试 UTF-8 时使用了每个字符 6 个字节，CHAR(1) 使用 6 个字节，CHAR(2) 使用 12 个字节，并以此类推。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>应该说，他们最初的行为才是正确的，可惜这一版本一直没有发布。</span><span style=font-size:15px>但是文档上却这么写了，而且广为流传，所有了解 UTF-8 的人都认同文档里写的东西。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>不过很显然，MySQL 开发者或厂商担心会有用户做这两件事：</span></section><ol class=list-paddingleft-2><li><section style=line-height:2em><span style=font-size:15px>使用 CHAR 定义列（在现在看来，CHAR 已经是老古董了，但在那时，在 MySQL 中使用 CHAR 会更快，不过从 2005 年以后就不是这样子了）。</span></section><li><section style=line-height:2em><span style=font-size:15px>将 CHAR 列的编码设置为“utf8”。</span></section></ol><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>我的猜测是 MySQL 开发者本来想帮助那些希望在空间和速度上双赢的用户，但他们搞砸了“utf8”编码。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>所以结果就是没有赢家。</span><span style=font-size:15px>那些希望在空间和速度上双赢的用户，当他们在使用“utf8”的 CHAR 列时，实际上使用的空间比预期的更大，速度也比预期的慢。</span><span style=font-size:15px>而想要正确性的用户，当他们使用“utf8”编码时，却无法保存像“”这样的字符。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>在这个不合法的字符集发布了之后，MySQL 就无法修复它，因为这样需要要求所有用户重新构建他们的数据库。</span><span style=font-size:15px>最终，MySQL 在 2010 年重新发布了“utf8mb4”来支持真正的 UTF-8。</span></section><h1 style='margin-top:35px;margin-bottom:15px;padding-bottom:.5em;font-weight:bold;cursor:text;font-size:1.2rem;border-bottom:1px solid #dddddd;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px;color:#ab1942>为什么这件事情会让人如此抓狂</span></h1><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>因为这个问题，我整整抓狂了一个礼拜。</span><span style=font-size:15px>我被“utf8”愚弄了，花了很多时间才找到这个 bug。</span><span style=font-size:15px>但我一定不是唯一的一个，网络上几乎所有的文章都把“utf8”当成是真正的 UTF-8。</span></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>“utf8”只能算是个专有的字符集，它给我们带来了新问题，却一直没有得到解决。</span></section><h1 style='margin-top:35px;margin-bottom:15px;padding-bottom:.5em;font-weight:bold;cursor:text;font-size:1.2rem;border-bottom:1px solid #dddddd;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px;color:#ab1942>总结</span></h1><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><span style=font-size:15px>如果你在使用 MySQL 或 MariaDB，不要用“utf8”编码，改用“utf8mb4”。</span><span style=font-size:15px>这里（https://mathiasbynens.be/notes/mysql-utf8mb4#utf8-to-utf8mb4）提供了一个指南用于将现有数据库的字符编码从“utf8”转成“utf8mb4”。</span></section><p style='font-family:-apple-system-font,BlinkMacSystemFont,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif;letter-spacing:.544px;white-space:normal;background-color:#ffffff;color:#3e3e3e;font-size:16px;widows:1;text-align:left;line-height:2em'><strong><span style=font-size:15px;letter-spacing:1px;font-family:宋体,SimSun;color:#ab1942>【推荐阅读<strong style=letter-spacing:.544px><span style=letter-spacing:1px>】</span></strong></span></strong><section style='font-family:-apple-system-font,BlinkMacSystemFont,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif;letter-spacing:.544px;white-space:normal;background-color:#ffffff;color:#3e3e3e;font-size:16px;widows:1;text-align:left;line-height:1.5em'><a href="https://mp.weixin.qq.com/s?__biz=MzI3NjU2ODA5Mg==&amp;mid=2247484738&amp;idx=2&amp;sn=a2ab25547e54eebe5cd47d779760928c&amp;scene=21#wechat_redirect" target=_blank data-linktype=2 style=-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer><span style=-webkit-tap-highlight-color:rgba(0,0,0,0);color:#021eaa;font-size:14px;letter-spacing:.544px>[技术]：细思极恐 - 你真的会写Java吗</span></a></section><section style='font-family:-apple-system-font,BlinkMacSystemFont,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif;letter-spacing:.544px;white-space:normal;background-color:#ffffff;color:#3e3e3e;font-size:16px;widows:1;text-align:left;line-height:1.5em'><a href="https://mp.weixin.qq.com/s?__biz=MzI3NjU2ODA5Mg==&amp;mid=2247484763&amp;idx=2&amp;sn=32c53f50806f60e1ae5a9606d2d5d295&amp;scene=21#wechat_redirect" target=_blank data-linktype=2 style=-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer><span style=-webkit-tap-highlight-color:rgba(0,0,0,0);color:#021eaa;font-size:14px;letter-spacing:.544px>[技术]：</span></a><a href="https://mp.weixin.qq.com/s?__biz=MzI3NjU2ODA5Mg==&amp;mid=2247484763&amp;idx=2&amp;sn=32c53f50806f60e1ae5a9606d2d5d295&amp;scene=21#wechat_redirect" target=_blank data-linktype=2 style=-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer><span style=-webkit-tap-highlight-color:rgba(0,0,0,0);color:#021eaa;font-size:14px;letter-spacing:.544px>巧用Java8中的Stream，让集合操作飞起来！</span></a></section><section style='font-family:-apple-system-font,BlinkMacSystemFont,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif;letter-spacing:.544px;white-space:normal;background-color:#ffffff;color:#3e3e3e;font-size:16px;widows:1;text-align:left;line-height:1.5em'><a href="https://mp.weixin.qq.com/s?__biz=MzI3NjU2ODA5Mg==&amp;mid=2247484802&amp;idx=2&amp;sn=df8f3d3751924b896ae0de0766a5283c&amp;scene=21#wechat_redirect" target=_blank data-linktype=2 style=-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;letter-spacing:.544px><span style=-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;letter-spacing:.544px;color:#021eaa;font-size:14px>[技术]</span><span style=-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;letter-spacing:.544px;color:#021eaa;font-size:14px>：</span><span style=-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;letter-spacing:.544px;color:#021eaa;font-size:14px>除不要 SELECT * ，使用数据库还应知道的11个技巧！</span></a><br></section><section style='font-family:-apple-system-font,BlinkMacSystemFont,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif;letter-spacing:.544px;white-space:normal;background-color:#ffffff;color:#3e3e3e;font-size:16px;widows:1;text-align:left;line-height:1.5em'><a href="https://mp.weixin.qq.com/s?__biz=MzI3NjU2ODA5Mg==&amp;mid=2247484813&amp;idx=2&amp;sn=64cd15f59d8406ce6dce9460f29b3399&amp;scene=21#wechat_redirect" target=_blank data-linktype=2 style=-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;letter-spacing:.544px;word-spacing:2px><span style=-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;letter-spacing:.544px;color:#021eaa;font-size:14px>[技术]：</span><span style=-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;letter-spacing:.544px;color:#021eaa;font-size:14px></span><span style=-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;letter-spacing:.544px;color:#021eaa;font-size:14px>史上最烂的项目：</span><span style=-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;letter-spacing:.544px;color:#021eaa;font-size:14px>苦撑 12 年，600 多万行代码</span></a></section><section style='margin-top:.8em;margin-bottom:.8em;color:#34495e;font-family:"Source Sans Pro","Helvetica Neue",Arial,sans-serif;font-size:16px;text-align:start;white-space:normal;background-color:#ffffff;line-height:2em'><img data-ratio=0.3333333333333333 data-type=jpeg data-w=1080 data-src="https://mmbiz.qpic.cn/mmbiz_jpg/M7B64fHXIStj2G1ryBlfibourJLibdiaATePdUl76gZQ2VEHHRIcLrKgYXCTOVc71xYXgS9QvmibTcnm56xDnKoBhQ/640?wx_fmt=jpeg" style='color:#3e3e3e;font-family:-apple-system-font,BlinkMacSystemFont,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif;font-size:16px;letter-spacing:.544px;white-space:normal;widows:1;visibility:visible !important;width:677px !important;height:auto !important' _width=677px src="" crossorigin=anonymous data-fail=0><br></section>
 </div>
 
 
 <div class=ct_mpda_wrp id=js_sponsor_ad_area style=display:none></div>
 
 <div class=read-more__area id=js_more_read_area style=display:none>
 
 </div>
 </div>
 
 
 
 <ul id=js_hotspot_area class=article_extend_area></ul>
 
 
<div class=rich_media_tool id=js_toobar3>
 <div class=weui-flex>
 <div class=weui-flex__item>
 
 <div id=js_read_area3 class="media_tool_meta tips_global_primary meta_primary" style=display:none>
 <span id=readTxt>阅读</span>
 <span id=readNum3></span>
 </div>
 </div>
 <span style=display:none class="media_tool_meta meta_extra meta_praise" id=like_old>
 <i class=icon_praise_gray></i><span class=praise_num id=likeNum_old></span>
 </span>
 
 <span style=visibility:hidden class="media_tool_meta meta_extra meta_like" id=like3>
 <button class=like_btn id=js_like_btn> 
 <span id=js_like_wording> 在看</span><span class=like_num id=likeNum3></span>
 </button>
 </span>
 
 </div>
</div>
 
 <div class=like_comment_wrp id=js_like_comment style=display:none>
 <div class=like_comment_inner>
 
 
 </div>
 </div> 
 <div style=display:none id=wow_close_inform>
 <div class=weui-mask></div>
 <div class=weui-dialog>
 
 
 
 </div>
 </div>
<div id=js_like_toast style=display:none>
 <div class=weui-mask_transparent></div>
 <div class=weui-toast>
 
 
 </div>
</div>
<div style=display:none id=js_comment_panel>
 <div class="like_comment_primary_wrp editing" id=js_comment_wrp>
 
 </div> 
 <div class=like_comment_primary_mask id=js_mask_2></div>
</div>
<div id=js_loading style=display:none>
 <div class=weui-mask_transparent></div>
 <div class=weui-toast>
 
 
 </div>
</div>
 </div>
 </div>
 <div class="rich_media_area_primary sougou" id=sg_tj style=display:none></div>
 
 <div class=rich_media_area_extra>
 <div class=rich_media_area_extra_inner>
 
 <div id=js_share_appmsg>
 </div>
 
 
 <div class=mpda_bottom_container id=js_bottom_ad_area style=display:none></div>
 
 <div id=js_iframetest style=display:none></div>
 
 <div class="rich_media_extra rich_media_extra_discuss" id=js_cmt_container style=display:none>
 
 
 <div class=discuss_mod id=js_friend_cmt_area style=display:none>
 
 
 
 </div>
 <div class=discuss_mod id=js_cmt_area style=display:none>
 </div>
 </div>
 </div>
 </div>
 
 <div id=js_pc_qr_code class=qr_code_pc_outer style=display:block;>
 <div class=qr_code_pc_inner>
 <div class=qr_code_pc>
 <img id=js_pc_qr_code_img class=qr_code_pc_img src="">
 <p>微信扫一扫<br>关注该公众号</p>
 </div>
 </div>
 </div>
 </div>
</div>
<div id=js_pc_weapp_code class="weui-desktop-popover weui-desktop-popover_pos-up-center weui-desktop-popover_img-text" style=display:none>
 <div class=weui-desktop-popover__content>
 
 </div>
</div>
<div id=js_minipro_dialog style=display:none>
 <div class=weui-mask></div>
 <div class="weui-dialog weui-dialog_link">
 
 
 
 
 </div>
</div>
<div id=js_link_dialog style=display:none>
 <div class=weui-mask></div>
 <div class="weui-dialog weui-dialog_link">
 
 
 
 
 </div>
</div>
<div class=comment_primary_emotion_panel_wrp id=js_emotion_panel_pc style=display:none>
 <div class=comment_primary_emotion_panel>
 
 </div>
</div>
<div class=weui-dialog__wrp id=js_alert_panel style=display:none>
 <div class=weui-mask></div>
 <div class=weui-dialog>
 
 
 </div>
</div>
<div id=js_weapp_without_auth_dialog style=display:none>
 <div class=weui-mask></div>
 <div class="weui-dialog weui-dialog_link">
 
 
 </div>
</div>
 
 
 
 
 
 
